<template>
	<view class="navBar" :style="{position: 'fixed',width: '100%',top: topHeigth,zIndex: '1111'}">
		<u-navbar leftIconSize="19" :autoBack="false" :leftIcon="leftIcon" :title="title"
			:titleStyle="{ color: '#FFF',fontSize: fontSize }" leftIconColor="#fff" :fixed="false" :height="44"
			:safeAreaInsetTop="false" :bgColor="bgColor" @leftClick="goHome">
			<!-- <view class="u-nav-slot" slot="left">
				<u-icon name="arrow-left" size="19"></u-icon>
			</view> -->

		</u-navbar>
	</view>
</template>

<script>
	export default {
		data() {
			return {}
		},
		props: {
			title: {
				type: String,
				default: "个人中心"
			},
			bgColor: {
				type: String,
				default: "rgba(0,0,0,0)"
			},
			topHeigth: {
				type: String,
				default: "44px"
			},
			leftIcon: {
				type: String,
				default: " "
			},
			fontSize: {
				type: String,
				default: "40rpx"
			},
		},
		onLoad(option) {

		},
		methods: {
			goHome() {
				console.log(this.leftIcon);
				if(this.leftIcon === "home") {
					uni.reLaunch({
						url: '/pages/login'
					});
				} else {
					uni.navigateBack({
						delta: 1
					});
				}
			}
		}
	}
</script>

<style>
</style>